﻿#define LK_REFLECTION_
namespace LK
{
	namespace Reflection
	{
		/**@brief 类型库*/
		struct TypeLibrary;

		/**@brief 类型库节点*/
		struct LibraryNode;
		/**@brief 域节点*/
		struct DomainNode;
		/**@brief 域节点代理*/
		struct PDomainNode;

		/**@brief 命名空间节点*/
		struct NamespaceNode;
		/**@brief 命名空间节点代理*/
		struct PNamespaceNode;

		/**@brief 类型节点，只表示原始类型*/
		struct TypeNode;
		/**@brief 类型节点代理*/
		struct PTypeNode;

		/**@brief 值节点*/
		struct ValueNode;
		/**@brief 值节点代理*/
		struct PValueNode;

		/**@brief 函数节点*/
		struct FunctionNode;
		/**@brief 函数节点代理*/
		struct PFunctionNode;

		struct ReflectionException;
		struct NotFoundException;
		struct TypeNotFoundException;
		struct NamespaceNotFoundException;
		struct FunctionNotFoundException;
		struct FunctionOverloadNotFoundException;
		/**
		@brief 动态调用函数（需要Reflection支持，若未启用Reflection将抛出异常）*/
		PObject DynamicCall(PObject&obj, PString const&functionName, ptr<Collection::IArray<PObject>>const&args);
#ifdef SUPPORT_VARIADIC_TEMPLATES
		template<class ReturnType, class ...ArgumentsType>ReturnType DynamicCall(PObject&obj, PString const&functionName, ArgumentsType...args);
#else
#define TMPF(x)\
		template<class ReturnType MF3_RepeatAsc(MF1__CT,2,x)> ReturnType DynamicCall(PObject&obj,PString const&functionName MF3_RepeatAsc(MF1__T,2,x));
		MF2_Repeatb(TMPF, _MRP_CNTM2)
#undef TMPF
#endif

	}
}